for (var i = 1; i <= 9; i++) {
  for (var j = 1; j <= i; j++) {
    document.write(
      j + "*" + i + "=" + i * j + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    );
  }
  document.write("<hr/>");
}
var cities = ["北京", "上海", "深圳", "武汉", "西安", "成都"];
document.write("<ol>");
for (var index in cities) {
  document.write("<li>" + cities[index] + "</li>");
}
document.write("</ol>");

var person ={
    "name":"张小明",
    "age":10,
    "foods":["苹果","香蕉","橘子","葡萄"],
    "eat":function (){
        console.log(this.age+"岁的"+this.name+"喜欢吃:")
        /* for(var i = 0;i<this.foods.length;i++){
            console.log(this.foods[i])
        }  */
       for(var food in this.foods){
        console.log(this.foods[food]) 
       }
    }
}
//获得对象属性值
console.log(person.name)
console.log(person.age)
console.log(person.foods)
//调用对象方法
person.eat();